<%@ taglib prefix="s" uri="/struts-tags" %>
<%--
  Created by IntelliJ IDEA.
  User: 高金磊
  Date: 2021/5/11
  Time: 9:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <link rel="icon" href="<%=basePath%>favicon.ico" type="image/ico">
    <link href="<%=basePath%>css/bootstrap.min.css" rel="stylesheet">
    <link href="<%=basePath%>css/fonts.css" rel="stylesheet">
    <link href="<%=basePath%>css/style.css" rel="stylesheet">
</head>
<body>

<s:action name="ManageComment">

    <div class="row">

        <div class="col-lg-12">
            <div class="card-toolbar clearfix">

                <form class="pull-left search-bar" method="get" action="<%=basePath%>ManageComment.action" role="form">

                    <div style="width: 500px" class="input-group">
                        <input name="key" type="text" class="form-control" value="<%=request.getParameter("key")==null?"":request.getParameter("key")%>"  placeholder="输入评论内容/书名/图书编号">
                        <span style="color:red"><s:actionerror/></span>
                    </div>
                </form>

            </div>
            <div class="card">
                <div class="card-body">
                    <div class="table-responsive">
                        <h4>搜索到(<s:property value="#request.data.size()"/>条相关评论)</h4>
                        <span style="color: #0FB25F"><s:actionmessage/></span>
                        <span style="color: red"><s:actionerror/></span>
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th>时间</th>
                                <th>图书名称</th>
                                <th>评论内容</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <s:iterator value="#request.data" var="data">


                                <tr>
                                    <td><s:property value="#data.formatDate()"/> </td>
                                    <td><a class="ftsucai-ui-07" title="点击查看本书的详细信息" href="ShowBookDetailInfo.action?modify_id=<s:property value="#data.bookId"/>"></a><s:property value="#data.bookName()"/> </td>
                                    <td><s:property value="#data.Comment"/> </td>
                                    <td>
                                        <div class="btn-group">
                                            <a class="btn btn-xs btn-default submenuitem" href="<%=basePath%>DelComment.action?modify_id=<s:property value="#data.id"/>" target= "_self" title="删除" data-toggle="tooltip"><i class="ftsucai-del-2"></i></a>
                                        </div>
                                    </td>
                                </tr>
                            </s:iterator>

                            </tbody>
                        </table>
                    </div>
                    <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
                </div>
            </div>
        </div>

    </div>

</s:action>



</body>

<script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/bootstrap.js"></script>
<script type="text/javascript" src="<%=basePath%>js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/main.min.js"></script>
<script type="text/javascript">
    $(function(){
        $('.search-bar .dropdown-menu a').click(function() {
            var field = $(this).data('field') || '';
            $('#search-field').val(field);
            $('#search-btn').html($(this).text() + ' <span class="caret"></span>');
        });
    });
</script>
</html>
